package com.add.petback.service.impl;

import com.add.petback.dao.CommentcastMapper;
import com.add.petback.model.Commentcast;
import com.add.petback.service.CommentcastService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (Commentcast)表服务实现类
 *
 * @author makejava
 * @since 2020-03-10 15:54:09
 */
@Service("commentcastService")
public class CommentcastServiceImpl implements CommentcastService {

    @Resource
    private CommentcastMapper mapper;

    @Override
    public void insert(Commentcast object) {
        mapper.insertSelective(object);
    }

    @Override
    public void save(Commentcast object) {
        mapper.updateByPrimaryKeySelective(object);
    }

    @Override
    public List<Commentcast> getAll() {
        return mapper.list(new Commentcast());
    }

    @Override
    public Commentcast find(Commentcast object) {
        return mapper.find(object);
    }

    @Override
    public void delete(Commentcast object) {
        mapper.deleteByPrimaryKey(object.getCommentcastpk());
    }

    @Override
    public List<Commentcast> getList(Commentcast object) {
        return mapper.list(object);
    }

}